#!/usr/bin/python3

from tkinter import *
from tkinter import ttk

class App():
    def __init__(self):
        self.root = Tk()

    def addLabelFrame(self):
        self.labelframe = LabelFrame(
                self.root, 
                text='programming languages choice', 
                padx=15, 
                pady=15)
        self.labelframe.pack()

    def addLabel(self):
        langs = [
                    ('python', 1),
                    ('perl', 2),
                    ('ruby', 3),
                    ('lua', 4)
                ]
        value = IntVar()
        value.set(1)
        for lang,num in langs:
            radiobutton = Radiobutton(
                    self.labelframe, 
                    text=lang, 
                    variable=value, 
                    value = num)
            radiobutton.pack(anchor=W)


    def run(self):
        self.addLabelFrame()
        self.addLabel()
        self.root.mainloop()

if __name__ == "__main__":
    app = App()
    app.run()
